#ifndef ADDITION_BOX_H_JM_20120627
#define ADDITION_BOX_H_JM_20120627

#include "OperationBox.h"
#include "../GenericBoxModel.h"
#include "AdditionBoxDescriptor.h"

//#include <functional>

namespace jm4bbx {


	template<typename T>
	class  AditionTrait {
	public:
		typedef T operation_policy;
		typedef typename T::value_type value_type;

		value_type performeOperation(value_type x, value_type y) const { 
			return x + y; 
		}
	};

	class IntegerAdditionBox : 
		public OperationBox<AditionTrait<bobox::int_policy>/*, IntegerAdditionBoxDescriptor*/> {
	public:

		IntegerAdditionBox(bobox::box_id_type id, bobox::box_tid_type tid, 
			bobox::request *req, const bobox::parameters &params) 
			: OperationBox(id, tid, req, params) { }

	};

	class StringAdditionBox : 
		public OperationBox<AditionTrait<bobox::string_policy>/*, StringAdditionBoxDescriptor*/> {
	public:

		StringAdditionBox(bobox::box_id_type id, bobox::box_tid_type tid, 
			bobox::request *req, const bobox::parameters &params) 
			: OperationBox(id, tid, req, params) { }
	};


}
#endif
